<script setup>
  const {list} = defineProps({
    list:Array
  })
  const emit=defineEmits(['clear'])
  // 方法
  const clear = () => {
    emit('clear');
};
</script>

<template>
  <!-- 统计和清空 -->
  <footer class="footer">
    <!-- 统计 -->
    <span class="todo-count"
      >合 计:<strong> {{ list.length }} </strong></span
    >
    <!-- 清空 -->
    <button @click="clear" class="clear-completed">清空任务</button>
  </footer>
</template>


<style>
</style>